package at.fhooe.tof.app;

import java.awt.Image;
import java.util.ArrayList;

public class Observer {
	private static ArrayList<IObserverSubscriber> recipients = new ArrayList<IObserverSubscriber>(); 
	
	public static void register(IObserverSubscriber subsriber){
		recipients.add(subsriber);
	}
	
	public static void sendMsg(String msg){
		for(IObserverSubscriber s : recipients){
			s.receive(msg);
		}
	}
	
	public static void sendMsg(Image image){
		for(IObserverSubscriber s : recipients){
			s.receive(image);
		}
	}
}
